{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication\Log\3_1_Regional_Germany.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}29 Aug 2024, 15:41:01

{com}. do "C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication\Do\3_1_Regional_Germany.do"
{txt}
{com}. *****************************************************************************
. *         Analysis Regional Exposure to Automation and Hate incidents Germany   *
. *                                                                                                                                                       *                       
. * Author:                       Valentina Gonzalez Rostani                                                      *
. * Contact:                      mag384@pitt.edu                                                                 *
. * Date:                         August 21 2024                                                                                  *
. * Version:                      Stata 17                                                                                                       
. *                                                                                                                                                       *
. *****************************************************************************
. /*
> This do-file:
> - Creates Table 4 and A16 using data from electoral perfomance of the AfD, hate incidents, and exposure to automation. 
> 
> Input:
> - Data\Region_Germany\btw2017kreis (3).csv // This file contains electoral results. 
> - Data\Region_Germany\ RegionEntries14.dta // This file contains replication data from  "Trade and Manufacturing Jobs in Germany" By Wolfgang Dauth, Sebastian Findeisen, and Jens Suedekum
> - Data\Region_Germany\final_aggregated_data.dta// This file contains hate incidents in Germany, subset prepared from ARVIG data. The rmd which creates this file is named as  3_0_Regional_Germany_HateIncidents.rmd
> 
> - Alternatively you can go to line 79 and use prepared data: 
>         - Data\Regional_Germany.dta
> 
> Output:
> - Table 4: AfD Performance [Table\AfD_high_pop_r2.tex]
> - Table A16: Summary statistics of variables used in this study about AfD regional performance [Table\AfD_descriptive.tex]
> 
> */
. 
. *Defining Directory
. cd "C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication"
{res}C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication
{txt}
{com}. 
. * Merging and preparing data - alternatively go to line 79
. {c -(}
. // Electoral data
. {c -(}
. import delimited "Data\Region_Germany\btw2017kreis (3).csv", varnames(5) clear 
{res}{txt}(encoding automatically selected: ISO-8859-1)
{text}(81 vars, 404 obs)
{com}. drop if _n == 1
{txt}(1 observation deleted)
{com}. destring wahlberechtigte wähler ungültige gültige cdu spd dielinke grüne csu fdp afd npd freiewähler bp volksabstimmung pdv mlpd büso sgp dierechte tierschutzallianz b dkp diegrauen du mg menschlichewelt gesundheitsforschung vpartei dievioletten familie diefrauen mieterpartei neueliberale unabhängige übrige, replace
{txt}wahlberechtigte already numeric; no {res}replace
{txt}wähler already numeric; no {res}replace
{txt}ungültige: all characters numeric; {res}replaced {txt}as {res}long
{txt}gültige: all characters numeric; {res}replaced {txt}as {res}long
{txt}cdu: all characters numeric; {res}replaced {txt}as {res}long
{txt}spd: all characters numeric; {res}replaced {txt}as {res}long
{txt}dielinke: all characters numeric; {res}replaced {txt}as {res}long
{txt}grüne: all characters numeric; {res}replaced {txt}as {res}long
{txt}csu: all characters numeric; {res}replaced {txt}as {res}long
{txt}fdp: all characters numeric; {res}replaced {txt}as {res}long
{txt}afd: all characters numeric; {res}replaced {txt}as {res}long
{txt}npd: all characters numeric; {res}replaced {txt}as {res}long
{txt}freiewähler: all characters numeric; {res}replaced {txt}as {res}long
{txt}bp: all characters numeric; {res}replaced {txt}as {res}long
{txt}volksabstimmung: all characters numeric; {res}replaced {txt}as {res}int
{txt}pdv: all characters numeric; {res}replaced {txt}as {res}int
{txt}mlpd: all characters numeric; {res}replaced {txt}as {res}long
{txt}büso: all characters numeric; {res}replaced {txt}as {res}int
{txt}sgp: all characters numeric; {res}replaced {txt}as {res}int
{txt}dierechte: all characters numeric; {res}replaced {txt}as {res}int
{txt}tierschutzallianz: all characters numeric; {res}replaced {txt}as {res}int
{txt}b: all characters numeric; {res}replaced {txt}as {res}int
{txt}dkp: all characters numeric; {res}replaced {txt}as {res}int
{txt}diegrauen: all characters numeric; {res}replaced {txt}as {res}int
{txt}du: all characters numeric; {res}replaced {txt}as {res}int
{txt}mg: all characters numeric; {res}replaced {txt}as {res}int
{txt}menschlichewelt: all characters numeric; {res}replaced {txt}as {res}int
{txt}gesundheitsforschung: all characters numeric; {res}replaced {txt}as {res}int
{txt}vpartei: all characters numeric; {res}replaced {txt}as {res}int
{txt}dievioletten: all characters numeric; {res}replaced {txt}as {res}int
{txt}familie: all characters numeric; {res}replaced {txt}as {res}int
{txt}diefrauen: all characters numeric; {res}replaced {txt}as {res}int
{txt}mieterpartei: all characters numeric; {res}replaced {txt}as {res}int
{txt}neueliberale: all characters numeric; {res}replaced {txt}as {res}int
{txt}unabhängige: all characters numeric; {res}replaced {txt}as {res}int
{txt}übrige: all characters numeric; {res}replaced {txt}as {res}long
{com}. 
. gen afp_prop = afd /gültige // valid vote
. 
. rename statistischekennziffer kreis
{res}{com}. {c )-}
. // Regional exposure of workers - Dauth et al 
. {c -(} 
. merge 1:1 kreis using "Data\Region_Germany\RegionEntries14.dta"
{res}{txt}{p 0 7 2}
(variable
{bf:kreis} was {bf:int}, now {bf:float} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}               5
{txt}{col 9}from master{col 30}{res}               3{txt}  (_merge==1)
{col 9}from using{col 30}{res}               2{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             400{txt}  (_merge==3)
{col 5}{hline 41}
{com}. 
. drop if _merge<3 
{txt}(5 observations deleted)
{com}. drop _merge
. {c )-}
. // Hate incidents Arvig
. {c -(}
. merge 1:1 kreis using "Data\Region_Germany\final_aggregated_data.dta", force
{res}{txt}{p 0 7 2}
(variable
{bf:kreis} was {bf:float}, now {bf:double} to accommodate using data's values)
{p_end}

{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}              84
{txt}{col 9}from master{col 30}{res}              84{txt}  (_merge==1)
{col 9}from using{col 30}{res}               0{txt}  (_merge==2)

{col 5}Matched{col 30}{res}             316{txt}  (_merge==3)
{col 5}{hline 41}
{com}.  
. replace anti=0 if anti==.
{txt}(84 real changes made)
{com}. {c )-}
. // Preparing clean file 
. {c -(}
. keep afd gültige afp_prop kreis anti routine  pop  perc_hq perc_foreign perc_female  perc_manuf_trad_nocars perc_manuf_auto  reg_south reg_east reg_north   state_n 
. 
. lab var perc_hq "Employment share of workers with University degree (\%)"
. lab var perc_foreign "Employment share of Foreign Born (\%)"
. lab var perc_female  "Employment share of Female (\%)"
. lab var perc_manuf_trad_nocars "Employment share of other manuf. (\%)"
. lab var  perc_manuf_auto "Employment share of manuf. of cars (\%)"
. lab var afp_prop "AfD Share of votes"
. lab var reg_south "South Region"
. lab var reg_east "East Region"
. lab var reg_north "North Region"
. lab var anti "\# Hate incidents per district"
. lab var routine "\# Routine workers"
. lab var pop "Population"
. lab var state_n "State number"
. 
. save "Data\Regional_Germany.dta", replace
{txt}{p 0 4 2}
file {bf}
Data\Regional_Germany.dta{rm}
saved
{p_end}
{com}. {c )-}
. {c )-}
{txt}
{com}. 
. * Alternatively you can call directly the data
. use "Data\Regional_Germany.dta", clear
{txt}
{com}. 
. *******************************************************************************
. * Preparing variables
. *******************************************************************************
. {c -(}
. gen rou_pop=(routine/pop)
. gen anti_pop=(anti/pop)*1000
. gen interaction_pop=anti_pop*rou_pop
. 
. lab var rou_pop "Share of  exposed workers"
. lab var anti_pop "Hate Incidents Per 1K Pop"
. lab var interaction_pop "Exposed x Hate"
. 
. {c )-}
{txt}
{com}. 
. *******************************************************************************
. * Analysis
. *******************************************************************************
. // Table 4: AfD Performance
. {c -(}
. global controls perc_hq perc_foreign perc_female  perc_manuf_trad_nocars perc_manuf_auto 
. 
. eststo clear
. 
. eststo: qui reg afp_prop rou_pop anti_pop , cluster(state_n) 
{txt}({res}est1{txt} stored)
{com}. 
. eststo: qui reg afp_prop rou_pop anti_pop perc_foreign $controls reg_south reg_east reg_north i.state_n, cluster(state_n) 
{txt}({res}est2{txt} stored)
{com}. 
. eststo: qui reg afp_prop rou_pop anti_pop interaction_pop     reg_south reg_east reg_north perc_foreign  $controls, cluster(state_n)
{txt}({res}est3{txt} stored)
{com}. eststo: qui reg afp_prop rou_pop anti_pop interaction_pop     reg_south reg_east reg_north  i.state_n perc_foreign $controls, cluster(state_n)
{txt}({res}est4{txt} stored)
{com}. 
. 
. esttab , replace label se title(AfD Performance \label {c -(}TableAfd{c )-})   compress nogap star(* 0.1 ** 0.05 *** 0.01) b(%6.3f) keep(rou_pop anti_pop interaction* )     indicate( "Other controls = perc_foreign" "FE State = *state_n" ) scalars( "N Observations" "r2 R$^2$" "aic AIC" )
{res}
{txt}AfD Performance \label {TableAfd}
{txt}{hline 68}
{txt}                       (1)          (2)          (3)          (4)   
{txt}                 AfD Sha~s    AfD Sha~s    AfD Sha~s    AfD Sha~s   
{txt}{hline 68}
{txt}Share of  expo~s{res}    -0.220        0.294*      -0.035        0.004   {txt}
                {res} {ralign 9:{txt:(}0.219{txt:)}}    {ralign 9:{txt:(}0.142{txt:)}}    {ralign 9:{txt:(}0.182{txt:)}}    {ralign 9:{txt:(}0.186{txt:)}}   {txt}
{txt}Hate Incidents~p{res}     0.654***    -0.042       -1.618***    -1.226*  {txt}
                {res} {ralign 9:{txt:(}0.115{txt:)}}    {ralign 9:{txt:(}0.090{txt:)}}    {ralign 9:{txt:(}0.527{txt:)}}    {ralign 9:{txt:(}0.655{txt:)}}   {txt}
{txt}Exposed x Hate  {res}                              18.772***    14.033*  {txt}
                {res}                           {ralign 9:{txt:(}5.879{txt:)}}    {ralign 9:{txt:(}7.039{txt:)}}   {txt}
{txt}Other controls  {res}        No          Yes          Yes          Yes   {txt}
{txt}FE State        {res}        No          Yes           No          Yes   {txt}
{txt}{hline 68}
{txt}Observations    {res}       400          400          400          400   {txt}
{txt}R$^2$           {res}     0.144        0.699        0.603        0.704   {txt}
{txt}AIC             {res}  -1.2e+03     -1.6e+03     -1.5e+03     -1.6e+03   {txt}
{txt}{hline 68}
{txt}Standard errors in parentheses
{txt}* p<0.1, ** p<0.05, *** p<0.01
{com}. 
. esttab using "Table\AfD_high_pop_r2.tex", replace label se title(AfD Performance \label {c -(}TableAfd{c )-})   compress nogap star(* 0.1 ** 0.05 *** 0.01) b(%6.3f) keep(rou_pop anti_pop interaction* )     indicate( "Other controls = perc_foreign" "FE State = *state_n" ) scalars( "N Observations" "r2 R$^2$" "aic AIC" ) nomtitle collabels(none) 
{res}{txt}(output written to {browse  `"Table\AfD_high_pop_r2.tex"'})
{com}. 
.         
. {c )-}
{txt}
{com}. *******************************************************************************
. * Descriptives
. *******************************************************************************
. {c -(}
. 
. eststo clear
. 
. // table A16: Summary statistics of variables used in this study about AfD regional performance
. {c -(}
. estpost sum afp_prop rou_pop anti_pop  anti    reg_south reg_east reg_north  $controls, d

{txt}{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:e(count)}{space 1}{space 1}{ralign 9:e(sum_w)}{space 1}{space 1}{ralign 9:e(mean)}{space 1}{space 1}{ralign 9:e(Var)}{space 1}{space 1}{ralign 9:e(sd)}{space 1}{space 1}{ralign 9:e(skewn~)}{space 1}{space 1}{ralign 9:e(kurto~)}{space 1}{space 1}{ralign 9:e(sum)}{space 1}{space 1}{ralign 9:e(min)}{space 1}{space 1}{ralign 9:e(max)}{space 1}{space 1}{ralign 9:e(p1)}{space 1}{space 1}{ralign 9:e(p5)}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:afp_prop}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf: .1211117}}}{space 1}{space 1}{ralign 9:{res:{sf: .0034863}}}{space 1}{space 1}{ralign 9:{res:{sf:  .059045}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.125577}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.004269}}}{space 1}{space 1}{ralign 9:{res:{sf: 48.44469}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf: .3739725}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf: .0498096}}}{space 1}
{space 0}{space 0}{ralign 12:rou_pop}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf: .0828056}}}{space 1}{space 1}{ralign 9:{res:{sf: .0001862}}}{space 1}{space 1}{ralign 9:{res:{sf: .0136461}}}{space 1}{space 1}{ralign 9:{res:{sf: .8652342}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.779402}}}{space 1}{space 1}{ralign 9:{res:{sf: 33.12225}}}{space 1}{space 1}{ralign 9:{res:{sf: .0404605}}}{space 1}{space 1}{ralign 9:{res:{sf: .1502379}}}{space 1}{space 1}{ralign 9:{res:{sf: .0567057}}}{space 1}{space 1}{ralign 9:{res:{sf: .0635674}}}{space 1}
{space 0}{space 0}{ralign 12:anti_pop}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:  .023344}}}{space 1}{space 1}{ralign 9:{res:{sf: .0011464}}}{space 1}{space 1}{ralign 9:{res:{sf: .0338583}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.482263}}}{space 1}{space 1}{ralign 9:{res:{sf: 34.58685}}}{space 1}{space 1}{ralign 9:{res:{sf: 9.337588}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf: .3618418}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}
{space 0}{space 0}{ralign 12:anti}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:   4.3325}}}{space 1}{space 1}{ralign 9:{res:{sf: 88.73879}}}{space 1}{space 1}{ralign 9:{res:{sf: 9.420127}}}{space 1}{space 1}{ralign 9:{res:{sf: 11.17956}}}{space 1}{space 1}{ralign 9:{res:{sf: 171.4371}}}{space 1}{space 1}{ralign 9:{res:{sf:     1733}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:      156}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}
{space 0}{space 0}{ralign 12:reg_south}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      .35}}}{space 1}{space 1}{ralign 9:{res:{sf: .2280702}}}{space 1}{space 1}{ralign 9:{res:{sf: .4775669}}}{space 1}{space 1}{ralign 9:{res:{sf: .6289709}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.395604}}}{space 1}{space 1}{ralign 9:{res:{sf:      140}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}
{space 0}{space 0}{ralign 12:reg_east}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:    .1925}}}{space 1}{space 1}{ralign 9:{res:{sf: .1558333}}}{space 1}{space 1}{ralign 9:{res:{sf: .3947573}}}{space 1}{space 1}{ralign 9:{res:{sf:  1.55987}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.433195}}}{space 1}{space 1}{ralign 9:{res:{sf:       77}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}
{space 0}{space 0}{ralign 12:reg_north}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:     .155}}}{space 1}{space 1}{ralign 9:{res:{sf: .1313033}}}{space 1}{space 1}{ralign 9:{res:{sf: .3623579}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.906579}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.635045}}}{space 1}{space 1}{ralign 9:{res:{sf:       62}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}
{space 0}{space 0}{ralign 12:perc_hq}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf: 14.29691}}}{space 1}{space 1}{ralign 9:{res:{sf: 30.75215}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.545462}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.537495}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.618539}}}{space 1}{space 1}{ralign 9:{res:{sf: 5718.765}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.766484}}}{space 1}{space 1}{ralign 9:{res:{sf: 36.42088}}}{space 1}{space 1}{ralign 9:{res:{sf: 6.881177}}}{space 1}{space 1}{ralign 9:{res:{sf: 7.817706}}}{space 1}
{space 0}{space 0}{ralign 12:perc_foreign}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf: 7.265539}}}{space 1}{space 1}{ralign 9:{res:{sf: 17.25872}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.154362}}}{space 1}{space 1}{ralign 9:{res:{sf: .5366759}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.731886}}}{space 1}{space 1}{ralign 9:{res:{sf: 2906.216}}}{space 1}{space 1}{ralign 9:{res:{sf: .8498082}}}{space 1}{space 1}{ralign 9:{res:{sf: 21.45751}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.102372}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.446724}}}{space 1}
{space 0}{space 0}{ralign 12:perc_female}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf: 45.81328}}}{space 1}{space 1}{ralign 9:{res:{sf: 18.96222}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.354563}}}{space 1}{space 1}{ralign 9:{res:{sf:-.2172321}}}{space 1}{space 1}{ralign 9:{res:{sf: 3.866188}}}{space 1}{space 1}{ralign 9:{res:{sf: 18325.31}}}{space 1}{space 1}{ralign 9:{res:{sf: 29.34286}}}{space 1}{space 1}{ralign 9:{res:{sf: 58.42828}}}{space 1}{space 1}{ralign 9:{res:{sf: 33.61651}}}{space 1}{space 1}{ralign 9:{res:{sf: 38.63738}}}{space 1}
{space 0}{space 0}{ralign 12:perc_manuf~s}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf: 21.52656}}}{space 1}{space 1}{ralign 9:{res:{sf: 99.51608}}}{space 1}{space 1}{ralign 9:{res:{sf: 9.975774}}}{space 1}{space 1}{ralign 9:{res:{sf: .5265183}}}{space 1}{space 1}{ralign 9:{res:{sf: 2.793041}}}{space 1}{space 1}{ralign 9:{res:{sf: 8610.624}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.858947}}}{space 1}{space 1}{ralign 9:{res:{sf: 56.96198}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.127999}}}{space 1}{space 1}{ralign 9:{res:{sf: 7.977122}}}{space 1}
{space 0}{space 0}{ralign 12:perc_manuf~e}{space 1}{c |}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf:      400}}}{space 1}{space 1}{ralign 9:{res:{sf: 1.041149}}}{space 1}{space 1}{ralign 9:{res:{sf:  25.4111}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.040943}}}{space 1}{space 1}{ralign 9:{res:{sf: 7.089951}}}{space 1}{space 1}{ralign 9:{res:{sf: 59.65266}}}{space 1}{space 1}{ralign 9:{res:{sf: 416.4595}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf: 54.33518}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}

{space 0}{space 0}{ralign 12:}{space 1}{c |}{space 1}{ralign 9:e(p10)}{space 1}{space 1}{ralign 9:e(p25)}{space 1}{space 1}{ralign 9:e(p50)}{space 1}{space 1}{ralign 9:e(p75)}{space 1}{space 1}{ralign 9:e(p90)}{space 1}{space 1}{ralign 9:e(p95)}{space 1}{space 1}{ralign 9:e(p99)}{space 1}
{space 0}{hline 13}{c   +}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}{hline 11}
{space 0}{space 0}{ralign 12:afp_prop}{space 1}{c |}{space 1}{ralign 9:{res:{sf: .0697839}}}{space 1}{space 1}{ralign 9:{res:{sf: .0863305}}}{space 1}{space 1}{ralign 9:{res:{sf: .1075564}}}{space 1}{space 1}{ralign 9:{res:{sf: .1393188}}}{space 1}{space 1}{ralign 9:{res:{sf: .2072242}}}{space 1}{space 1}{ralign 9:{res:{sf: .2436473}}}{space 1}{space 1}{ralign 9:{res:{sf: .3077291}}}{space 1}
{space 0}{space 0}{ralign 12:rou_pop}{space 1}{c |}{space 1}{ralign 9:{res:{sf: .0672207}}}{space 1}{space 1}{ralign 9:{res:{sf: .0740081}}}{space 1}{space 1}{ralign 9:{res:{sf: .0813159}}}{space 1}{space 1}{ralign 9:{res:{sf: .0900047}}}{space 1}{space 1}{ralign 9:{res:{sf: .0990071}}}{space 1}{space 1}{ralign 9:{res:{sf: .1057745}}}{space 1}{space 1}{ralign 9:{res:{sf: .1278682}}}{space 1}
{space 0}{space 0}{ralign 12:anti_pop}{space 1}{c |}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf: .0046362}}}{space 1}{space 1}{ralign 9:{res:{sf: .0137117}}}{space 1}{space 1}{ralign 9:{res:{sf: .0298573}}}{space 1}{space 1}{ralign 9:{res:{sf: .0557183}}}{space 1}{space 1}{ralign 9:{res:{sf: .0733382}}}{space 1}{space 1}{ralign 9:{res:{sf: .1987308}}}{space 1}
{space 0}{space 0}{ralign 12:anti}{space 1}{c |}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        2}}}{space 1}{space 1}{ralign 9:{res:{sf:        5}}}{space 1}{space 1}{ralign 9:{res:{sf:        9}}}{space 1}{space 1}{ralign 9:{res:{sf:       13}}}{space 1}{space 1}{ralign 9:{res:{sf:     31.5}}}{space 1}
{space 0}{space 0}{ralign 12:reg_south}{space 1}{c |}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:reg_east}{space 1}{c |}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:reg_north}{space 1}{c |}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}{space 1}{ralign 9:{res:{sf:        1}}}{space 1}
{space 0}{space 0}{ralign 12:perc_hq}{space 1}{c |}{space 1}{ralign 9:{res:{sf: 9.089828}}}{space 1}{space 1}{ralign 9:{res:{sf: 10.63613}}}{space 1}{space 1}{ralign 9:{res:{sf:  12.9793}}}{space 1}{space 1}{ralign 9:{res:{sf: 16.10734}}}{space 1}{space 1}{ralign 9:{res:{sf: 21.73898}}}{space 1}{space 1}{ralign 9:{res:{sf: 25.91532}}}{space 1}{space 1}{ralign 9:{res:{sf: 34.17693}}}{space 1}
{space 0}{space 0}{ralign 12:perc_foreign}{space 1}{c |}{space 1}{ralign 9:{res:{sf: 1.990471}}}{space 1}{space 1}{ralign 9:{res:{sf: 4.039501}}}{space 1}{space 1}{ralign 9:{res:{sf: 6.786431}}}{space 1}{space 1}{ralign 9:{res:{sf: 10.10979}}}{space 1}{space 1}{ralign 9:{res:{sf: 13.11618}}}{space 1}{space 1}{ralign 9:{res:{sf: 14.63793}}}{space 1}{space 1}{ralign 9:{res:{sf: 17.65861}}}{space 1}
{space 0}{space 0}{ralign 12:perc_female}{space 1}{c |}{space 1}{ralign 9:{res:{sf: 40.68876}}}{space 1}{space 1}{ralign 9:{res:{sf: 43.06038}}}{space 1}{space 1}{ralign 9:{res:{sf:  45.8063}}}{space 1}{space 1}{ralign 9:{res:{sf: 48.48703}}}{space 1}{space 1}{ralign 9:{res:{sf: 51.01759}}}{space 1}{space 1}{ralign 9:{res:{sf:  53.3402}}}{space 1}{space 1}{ralign 9:{res:{sf: 55.99931}}}{space 1}
{space 0}{space 0}{ralign 12:perc_manuf~s}{space 1}{c |}{space 1}{ralign 9:{res:{sf:  9.62051}}}{space 1}{space 1}{ralign 9:{res:{sf: 13.29267}}}{space 1}{space 1}{ralign 9:{res:{sf: 20.07836}}}{space 1}{space 1}{ralign 9:{res:{sf: 27.91664}}}{space 1}{space 1}{ralign 9:{res:{sf: 35.72295}}}{space 1}{space 1}{ralign 9:{res:{sf: 39.84246}}}{space 1}{space 1}{ralign 9:{res:{sf:  46.3646}}}{space 1}
{space 0}{space 0}{ralign 12:perc_manuf~e}{space 1}{c |}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf:        0}}}{space 1}{space 1}{ralign 9:{res:{sf: .0266213}}}{space 1}{space 1}{ralign 9:{res:{sf: .5361576}}}{space 1}{space 1}{ralign 9:{res:{sf: 5.190267}}}{space 1}{space 1}{ralign 9:{res:{sf: 29.84415}}}{space 1}
{com}. 
. esttab , /// 
>         cells("mean(label(Mean) fmt(2)) p50(label(Median) fmt(2)) sd(label(S.D.) fmt(2)) min(label(Min.) fmt(2)) max(label(Max) fmt(2)) count(label(Obs.) fmt(0))") ///
>         nonumber label replace noobs
{res}
{txt}{hline 98}
{txt}                                                                                                  
{txt}                             Mean       Median         S.D.         Min.          Max         Obs.
{txt}{hline 98}
{txt}AfD Share of votes  {res}         0.12         0.11         0.06         0.00         0.37          400{txt}
{txt}Share of  exposed ~s{res}         0.08         0.08         0.01         0.04         0.15          400{txt}
{txt}Hate Incidents Per~p{res}         0.02         0.01         0.03         0.00         0.36          400{txt}
{txt}\# Hate incidents ~t{res}         4.33         2.00         9.42         0.00       156.00          400{txt}
{txt}South Region        {res}         0.35         0.00         0.48         0.00         1.00          400{txt}
{txt}East Region         {res}         0.19         0.00         0.39         0.00         1.00          400{txt}
{txt}North Region        {res}         0.15         0.00         0.36         0.00         1.00          400{txt}
{txt}Employment share o~h{res}        14.30        12.98         5.55         5.77        36.42          400{txt}
{txt}Employment share o~n{res}         7.27         6.79         4.15         0.85        21.46          400{txt}
{txt}Employment share o~){res}        45.81        45.81         4.35        29.34        58.43          400{txt}
{txt}Employment sh.. (\%){res}        21.53        20.08         9.98         1.86        56.96          400{txt}
{txt}Employment sh.. of~){res}         1.04         0.00         5.04         0.00        54.34          400{txt}
{txt}{hline 98}
{com}. eststo clear
. 
. esttab using "Table\AfD_descriptive.tex", /// 
>         cells("mean(label(Mean) fmt(2)) p50(label(Median) fmt(2)) sd(label(S.D.) fmt(2)) min(label(Min.) fmt(2)) max(label(Max) fmt(2)) count(label(Obs.) fmt(0))") ///
>         nonumber label replace noobs
{res}{txt}(output written to {browse  `"Table\AfD_descriptive.tex"'})
{com}. eststo clear
. {c )-}
. {c )-}
{txt}
{com}. 
{txt}end of do-file

{com}. exit, clear
